<!--查询指定日志-->
<!DOCTYPE>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>查询指定日志</title>
    <link rel="stylesheet" href="../lib/layui-v2.6.3/css/layui.css">
</head>
<body>
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
    <legend>查询指定日志</legend>
</fieldset>
<!--面板-->
<div class="layui-card">
    <div class="layui-card-body">
        <label class="layui-form-label">日志编码</label>
        <div class="layui-input-inline">
            <input type="text" id="logName" class="layui-input">
        </div>
        <button onclick="search();" class="layui-btn"><i class="layui-icon">&#xe615;</i></button>
        <!--数据表格-->
        <table id="logList" lay-filter="logTable"></table>
    </div>

</div>

<script src="../lib/jquery-3.4.1/jquery-3.4.1.min.js"></script>
<script src="../lib/layui-v2.6.3/layui.js"></script>
<script>
    //搜索
    function search(){
        //气体名称
        var logName=$("#logName").val();
        window.location.href="/files/"+logName;
    }
    layui.use('table',function(){
        var table = layui.table;

        //第一个实例
        table.render({
            elem: '#logList',
            url: '/file/list',//数据接口
            page: true,//开启分页
            cols: [[ //表头
                {field: 'logId', title: '文件编码', sort: true, fixed: 'left'}
                ,{field: 'filename', title: '文件名称'}
                ,{field: 'type', title: '文件格式'}
                ,{field: 'size', title: '文件大小(B)', }
                ,{field: 'updateTime', title: '上传时间'}
            ]]
        });
        laypage.render({
            elem: 'logList'
            ,count: 1000
            ,limit: 100
            ,limits: [50, 100, 150]
        });

    });
</script>
</body>
</html>